package com.project.feign.client;

import com.project.common.core.utils.exception.Result;
import com.project.feign.client.impl.WeChatServiceClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 小程序服务调用客户端
 *
 * @Author: wyy
 * @Date: 2020-04-24 15:06
 */
@FeignClient(name = "wechat-service", fallback = WeChatServiceClientImpl.class)
public interface WeChatServiceClient {

    /**
     * 生成无限制小程序码
     *
     * @param scene   场景值
     * @param pageUri 小程序页面路由地址
     * @param width   小程序码大小
     * @return
     */
    @PostMapping(value = "/xyWeChat/mini/getMiniQrCodeImg")
    Result<String> getMiniQrCodeImg(@RequestParam("scene") String scene, @RequestParam("pageUri") String pageUri, @RequestParam("width") int width);

    /**
     * 小程序敏感内容校验
     * @param comment   内容信息
     * @return
     */
    @PostMapping(value = "/xyWeChat/mini/getCommentCheck")
    Result<Boolean> getMiniCommentCheck(@RequestParam("comment") String comment);

    /**
     * 发送微信推动的消息模板
     * @author light
     * @date 2020-06-29 18:26
     * @params
     * @param learnBlogId   学友圈id
     * @param teacherName   老师名称
     * @param xcxUserId     用户id
     * @param xcxOpenId     微信openid
     * @param chapterTitle  章节title
     * @return java.lang.Boolean
     **/
    @PostMapping("/xyWeChat/mp/sendTemplateMsg")
    Boolean sendTemplateMsg(@RequestParam("learnBlogId") String learnBlogId, @RequestParam("teacherName") String teacherName,@RequestParam("xcxUserId") String xcxUserId,@RequestParam("xcxOpenId") String xcxOpenId,@RequestParam("chapterTitle") String chapterTitle);
}
